package cn.sytton.taffe.web.flw.entity;

import cn.sytton.taffe.framework.base.entity.BaseUpdatedEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;


import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 表单实例 对象
 * </p>
 *
 * @author rock
 * @since 2023-09-27
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("flw_form_instance")
@Schema(description = "表单实例")
public class FormInstanceEntity extends BaseUpdatedEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "表单实例ID")
    @TableId(type = IdType.ASSIGN_ID)
    private String formInstanceId;

    @Schema(description = "表单实例编号")
    private String formInstanceCode;

    @Schema(description = "表单实例名称")
    private String formInstanceName;

    @Schema(description = "申请人ID")
    private String applyUserId;

    @Schema(description = "申请时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date applyDateTime;

    @Schema(description = "流程完成时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date completedDateTime;

    @Schema(description = "单据状态(初始0/进行中1/完成2)")
    private Integer statue = 0;

    @Schema(description = "表单ID")
    private String formId;

    @Schema(description = "流程Key")
    private String processDefKey;

    @Schema(description = "流程ID")
    private String processDefId;

    @Schema(description = "流程实例ID")
    private String processInstanceId;

    @Schema(description = "当前环节")
    private String currentTask;

    //-----以下是关联属性-----
    @TableField(exist = false)
    private String applyUserName;

    @TableField(exist = false)
    private String applyDeptName;

    @TableField(exist = false)
    private String formValue;

    @TableField(exist = false)
    private String formJson;
}
